package com.itxiaosu.strategy.impl;

import com.itxiaosu.constants.FruitConstants;
import com.itxiaosu.strategy.DiscountStrategy;

// 满减折扣策略类
public class FullDiscount implements DiscountStrategy {
    @Override
    public double discountType(double totalPrice) {
        if (totalPrice >= FruitConstants.DISCOUNT_THRESHOLD) {
            return totalPrice - FruitConstants.DISCOUNT_AMOUNT;
        }
        return totalPrice;
    }
}
